package com.usian.controller;

import com.usian.feign.StudentFeign;
import com.usian.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentController {

    @Autowired
    private StudentFeign studentFeign;

    @RequestMapping("consumer/finaAll")
    public List<Student> findAll(){
        return studentFeign.findAll();
    }

}
